package Model2HomeWork;
//上网套餐类 特征：上网流量、每月资费 行为：显示所有套餐信息

public class NetPlan extends Plan implements NetService{
    private double netFlow;
    private double netPriceMonth;

    public NetPlan() {
    }

    public NetPlan(double netFlow, double netPriceMonth) {
        this.netFlow = netFlow;
        this.netPriceMonth = netPriceMonth;
    }

    public double getNetFlow() {
        return netFlow;
    }

    public void setNetFlow(double netFlow) {
        this.netFlow = netFlow;
    }

    public double getNetPriceMonth() {
        return netPriceMonth;
    }

    public void setNetPriceMonth(double netPriceMonth) {
        this.netPriceMonth = netPriceMonth;
    }
    //打印上网套餐的信息
    public void showNetPlan(){
        System.out.println("当前上网流量为：" + getNetFlow() + "GB" +
                "每月资费为：" + " " + getNetPriceMonth() + "元");
    }
    @Override
    public void getPayment(){
        System.out.println("当前上网流量为：" + getNetFlow() + "GB" +
                "每月资费为：" + " " + getNetPriceMonth() + "元");

    }

    @Override
    public void net(double netflow, SIMCard sc) {
        System.out.println("实现上网服务接口");
        System.out.println("网络流量为：" + netflow + "GB" +
                " " + "手机卡类型为：" + sc);
    }
}
